#include "chess.h"
#ifndef Lab_Board
#define Lab_Board
class Board
{
private:
    static Board *instance;
public:
    void clear_all();//clear the board
    void show_board();//show the board
    void init_board();//init the sign on the board
    void init_chesses();//init all chesses on the board
    void update_board_by_chesses();
    int get_winner();//return the winner,if no winner, return -1
    void init();//init for a game
    bool move_chess(int fromx, int fromy, int targetx, int targety, int owner); // the return val means whether the move sucsess
    static Board* get_instance()
    {
        if(Board::instance == NULL)
            Board::instance = new Board();
        return Board::instance;
    }
private :
    char display_board[10][10]; // only be used in one instant
    std::vector<Chess*> chesses;
    Board(){};
    ~Board(){};
};
#endif // !Lab_Board